carousel('.rotation-Chart')
function carousel(e){
    let box = document.querySelector(e)
    let img = box.querySelector('.carousel-inner')
    let button = box.querySelectorAll('.carousel-indicators button')
    let index = 0 
    button.forEach(element => {
        element.addEventListener('mouseenter',function(){
            // index = element.data-bs-slide-to
            index = this.getAttribute('data-bs-slide-to')
            for ( var i = 0 ; i < button.length ; i++){
                button[i].className = ''
            }
            button[index].className = 'active'
            img.style.marginLeft = (-820*index)+'px'
        })
    });
}